{	Problem: http://codeforces.ru/problemset/problem/69/E
	Verdict: Accepted

}
var t,r,c,a,b,num:array[0..1000010]of longint; s,d,n,k,i,j:longint;
procedure qsort(l,r:longint);
var i,j,x,y:longint;
begin
i:=l;
j:=r;
x:=a[(l+r) div 2];
repeat
      while a[i]<x do inc(i);
      while x<a[j] do dec(j);
      if i<=j then begin
         y:=a[i];
         a[i]:=a[j];
         a[j]:=y;
         y:=num[i];
         num[i]:=num[j];
         num[j]:=y;
         inc(i);
         dec(j);
      end;
until i>j;
if l<j then qsort(l,j);
if i<r then qsort(i,r);
end;
procedure u(v,k:longint);
begin
while v>0 do begin
      inc(t[v],k);
      v:=v div 2;
end;
end;
begin
fillchar(c,sizeof(c),0);
read(n,k);
for i:=1 to n do begin
    read(a[i]);
    num[i]:=i;
end;
qsort(1,n);
s:=1;
while s<n do s:=s*2;
d:=0;
a[0]:=-maxlongint;
for i:=1 to n do begin
    if a[i]<>a[i-1] then inc(d);
    b[num[i]]:=d;
    r[d]:=a[i];
end;
for i:=1 to k-1 do begin
    inc(c[b[i]]);
    if c[b[i]]=1 then u(s-1+b[i],1) else if c[b[i]]=2 then u(s-1+b[i],-1);
end;
for i:=k to n do begin
    inc(c[b[i]]);
    if c[b[i]]=1 then u(s-1+b[i],1) else if c[b[i]]=2 then u(s-1+b[i],-1);
    if i>k then begin
       dec(c[b[i-k]]);
       if c[b[i-k]]=1 then u(s-1+b[i-k],1) else if c[b[i-k]]=0 then u(s-1+b[i-k],-1);
    end;
    if t[1]=0 then begin
       writeln('Nothing');
       continue;
    end;
    j:=1;
    while j<s do
          if t[j*2+1]>0 then j:=j*2+1 else j:=j*2;
     writeln(r[j-s+1]);
    end;
 end. 